/*
 * Direction.h
 *
 *  Created on: 06/05/2011
 *      Author: DessaVida
 */

#ifndef DIRECTION_H_
#define DIRECTION_H_

#include "ResourceManager.h"
#include <string>
using namespace std;
#include "Component.h"
#include "entity/Controller.h"
#include "math/Rectangle.h"
#include "Body.h"
#include "Attack.h"
#include "Shoot.h"

enum EnumDirection{SOUTH, EAST, NORTH, WEST};

class Direction : public Component{
private:
	EnumDirection previousDir;
	EnumDirection dir;
public:
	Direction(int id);
	Direction(int id, string dirName);
	virtual ~Direction();

	void set(Controller *controller);
	void update(Body *body);
	void update(Body* body, Attack *attack, Shoot *shoot);
	Rectangle rotate(Rectangle rect, Point2D origin);
	Point2D rotate(Point2D point, Point2D origin);
	/*
	 * Getters and Setters
	 */
    EnumDirection getDir() const;
    void setDir(EnumDirection dir);
    EnumDirection getPreviousDir() const;
    void setPreviousDir(EnumDirection previousDir);
};

#endif /* DIRECTION_H_ */
